<?php
/**
 * MVC_Read_ini
 * @Version 1.0
 * date: 08May2008
 * 
 * @author Thanh NV
 * sony_k48@yahoo.com
 * 
*/
class MVC_Read_ini {
	private $fileINI;
	
	public function __construct(){
		
	}
	
	public function set_file($fileINI){
		if(is_file($fileINI)){
			$this->fileINI = $fileINI;
		}else{
			die("Not found INI file {$fileINI} on line ".__FILE__.__LINE__);
		}
	}
	
	public function parse(){
		if(!is_file($this->fileINI)){
			die("Missing INI file {$this->fileINI} on line ".__FILE__.__LINE__);
		}
		// Parse with sections
		$ini_array = parse_ini_file($this->fileINI, true);
		return $ini_array;
	}
}
